{% extends 'admin/common/base.html' %}
{% block css %}
{{super()}}
<link href="{{url_for('admin.static',filename='ajax/libs/jasny/jasny-bootstrap.min.css')}}?v=3.1.3" rel="stylesheet"/>
{% endblock %}
{% block body %}
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form">
            <input type="hidden" name="id" value="{{d.id}}">
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="name" id="name" value="{{d.name}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">支付金额：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="price" id="price" value="{{d.price}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label is-required">天数：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="days" id="days" value="{{d.days}}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">排序：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="sn" id="sn" value="{{d.sn}}" required>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-3 control-label ">描述：</label>
				<div class="col-sm-8">
                    <textarea id="desp" name="desp" class="tinymce-editor">{{d.desp}}</textarea>
				</div>
			</div>
		</form>
	</div>
</body>
{% endblock %}
{% block js %}
{{ super() }}
<script src="{{url_for('admin.static',filename='ajax/libs/jasny/jasny-bootstrap.min.js')}}?v=3.1.3"></script>
<script src="{{url_for('admin.static',filename='ajax/libs/tinymce/js/tinymce/tinymce.min.js')}}"></script>
<script src="{{url_for('admin.static',filename='js/my_tinymce.js')}}"></script>
<script type="text/javascript">

    
    $("#form").validate({

    });
    
    function submitHandler() {
        if ($.validate.form()) {
            tinyMCE.triggerSave();
            $.operate.save("{{url_for('admin.cms.vipprice.edit')}}", $('#form').serialize());
        }
    }

</script>
{% endblock %}
